home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-1097 / AMOSLIST / text0045.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  1.0 KB  |  42 lines

  1. On 02-Oct-97, mtl.wberg@swipnet.se wrote:
  2.  
  3. >When i read a text file without that i will recive an error mezz
  4. >(input to long), 
  5.  
  6. >Ex
  7. >open in 1,a$
  8. >repeat
  9. >input #1,b$
  10. >until pof(1)=lof(1)
  11.  
  12. Your better off to load the text file into a memory bank. Once this is
  13. done then just Peek from it to read each letter and type to the screen.
  14.  
  15. Screen Open 0,640,200,2,Hires
  16.  
  17. F$=Fsel$("")
  18. Open In 1,F$ : L=Lof(1) : Close 1 : Rem Gets file size 
  19. Reserve As Work 10,L : Rem Can be any bank number 
  20. Bload F$,Start(10) : Rem Load file into memory
  21. '
  22. While POS<L
  23.    LINE$=Peek$(Start(10)+POS,100,Chr$(10))
  24.    Print LINE$
  25.    Add POS,Len(LINE$)+1
  26. Wend 
  27.  
  28. Hope this helps,
  29.  
  30. Anthony Sherratt
  31.  
  32. -- 
  33.  ÷    _       ____ ÷ ____`------------------------------------------°
  34.      /.\  ÷  / __/  / __,\      *http://www.talk-101.com/users/asp*
  35.   ,_/ ¡_\_ _/__ \_ /  ___/  O°····································°O
  36.  ,_____/  Y_      Y_  ¡  ·  o   #Monty The Wolf - OUT VERY SOON#     o
  37.   |   ¡   [ ] |   [ ] | -÷- Oo.....................................O
  38.   :   :   *DESIGN*  :   :  ·
  39.  
  40.  
  41.  
  42.